#pragma once
#include "Eigen/Dense"
#include "branch.h"
#include "param.h"
#include "electric_bases.h"
using namespace Eigen;
class single_phase_BCTRAN_transformer : public  electric_base
{
public:
    double L1, L2, Im, Le, Vtr_1, Vtr_2, Smva, freq; // 输入参数
    double K, Zb1, Zb2, x1, x2, xm, xe;
    Matrix2d LT, LT_inv_mult_2, GT;
    Vector2d Ihis;
    Vector2d V_port, I_port;
    // branch *br12, *br34, *br13, *br24, *br14, *br32;

    // L1, L2, Im, Le, Vtr_1, Vtr_2, Smva, freq
    void begin(param &Params);
    void dsdyn(double delt, double simulation_time = 0.0);
    void dsout(Vector2d &V);
    void G_Ihis_mapping();
};